﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
                assembly="Inovout.Kuajing.Exports"
				        namespace="Inovout.Kuajing.Exports.Models">

  <class name="Consignee" table="Exports_Consignee">
    <id name="Id" access="field.camelcase"
        column="ConsigneeId" type="Int32">
      <generator class="native" />
    </id>
    <property name="Address" type="String"></property>
    <set name="Exporters" table="Exports_Consignee_Exporters" cascade="all">
      <key column="ConsigneeId" foreign-key="fk_Consignee_Exporter"></key>
      <many-to-many class="Inovout.Kuajing.Exports.Models.Exporter" column="ExporterId"></many-to-many>
    </set>

    <many-to-one name="Organization" column="OrganizationUnitId" class="Inovout.Organizations.Models.OrganizationUnit" />

    <property name="CreatedTime" access="field.camelcase" />
    <property name="CreatedUserName" access="field.camelcase" />
    <property name="ModifiedTime" access="field.camelcase" />
    <property name="ModifiedUserName" access="field.camelcase" />
    <property name="AccessedTime" access="field.camelcase" />
    <property name="AccessedUserName" access="field.camelcase" />
    <property name="Memo" />
    <property name="IsInvalid" />
  </class>
</hibernate-mapping>
